using System;
using System.Collections.Generic;
using System.Text;
using System.Workflow.Activities;
using Decav.Gatsb.Mobile;

namespace Decav.Gatsb.Application
{
    /// <summary>
    /// Event arguments for when an <see cref="IWorkflowMessageGateway"/> receives a
    /// <see cref="MobileMessage"/> that resumes a suspended workflow, or a workflow
    /// waiting on events.
    /// </summary>
    [Serializable]
    public sealed class WorkflowMessageResponseReceivedEventArgs : ExternalDataEventArgs
    {
        public WorkflowMessageResponseReceivedEventArgs(Guid workflowId, MobileMessage message)
            : base(workflowId)
        {
            if (message == null)
                throw new ArgumentNullException("message");

            _message = message;
        }

        private MobileMessage _message;

        /// <summary>
        /// Gets the message received that restarts the workflow.
        /// </summary>
        public MobileMessage Message
        {
            get { return _message; }
        }

    }
}
